var app = getApp();
Page({
  data: {
    openid: app.globalData.openid
  },
  onLoad: function (options) {
    var that=this
    wx.setNavigationBarTitle({
      title: '优惠券'
    })
    //优惠券
    wx.request({
      url: getApp().data.apiurl + '/index.php/index/index/coupons?ropenid='+app.globalData.openid,
      data: {},
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        console.log(res);
        that.setData({
          coupons: res.data,
        });
      }
    });
  },

})